<?php 
    $keywords = $this->get_data('keywords');
?>
<?php if ($keywords):?>
<?php foreach ($keywords as $keyword) :?>
<div class="item">
    <div class="head">
        <a href="<?php echo tos_router_url(array('url' => '_label/' . tos_clean_url_segment($keyword['word'])));?>" 
            class="keyword" style="color:<?php echo '#' . $keyword['color'];?>; background:<?php echo '#' . $keyword['bg_color'];?>">
            <?php echo $keyword['word'];?>
        </a>
    </div>
    <div class="body">
        <?php m('node')->block_nodes_by_keyword_id($keyword['id'])->display();?>
    </div>
</div>
<?php endforeach;?>
<?php endif;?>